<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@page session="true"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet"
	href="${pageContext.request.contextPath}/resources/css/jquery.mobile-1.4.2.css">
<link rel="stylesheet"
	href="${pageContext.request.contextPath}/resources/css/app.css?v=0.2.11">
<script
	src="${pageContext.request.contextPath}/resources/js/jquery-1.11.0.min.js"></script>
<script
	src="${pageContext.request.contextPath}/resources/js/jquery.mobile-1.4.2.min.js"></script>
<script
	src="${pageContext.request.contextPath}/resources/js/jquery.validate.min.js"></script>
<script
	src="${pageContext.request.contextPath}/resources/js/jquery.validate.js"></script>
<script
	src="${pageContext.request.contextPath}/resources/js/additional-methods.min.js"></script>
<script
	src="${pageContext.request.contextPath}/resources/js/validations.js?v=0.2.11"></script>
<title>Consultar Visita Pendiente</title>
</head>
<body>
	<div data-role="page" data-ajax="false" data-theme="a">
		<div data-role="header">
			<h1>Visitas Pendientes</h1>
			<a data-iconpos="notext" data-icon="home"
					href="${pageContext.request.contextPath}"></a>
		</div>
		<div role="main" class="ui.content">
			<div class="centered-content">
				<h2>Visitas pendientes</h2>
				

				<form:form action="consultar_visita_pendiente" method="POST">

					<table class="outputTable fmt2">
						<tr>
							<td>Agente :</td>
							<td>${usuario.persona.nombre}</td>
						</tr>
						<tr>
							<th align="left">Nombre Cliente</th>
							<th align="left">Fecha de Registro</th>
							<th></th>
						</tr>
						<c:forEach items="${listaVisita}" var="visita">
							<tr>
								<td align="left">${visita.cliente.nombre}</td>

								<td><fmt:formatDate value="${visita.fechaRegistro}"
										pattern="dd/MM/yyyy HH:mm" timeZone="GMT-4" /></td>
								<td><a
									href="${pageContext.request.contextPath}/finalizar_visita/${visita.id}"
									class="ui-btn ui-mini" data-ajax="false">Finalizar visita</a></td>
							</tr>
						</c:forEach>




					</table>
				</form:form>
			</div>
		</div>


	</div>
</body>
</html>